package com.quan.bookmall.dto;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
public class CartItemDTO {
    
    private Long id;
    
    private Long userId;
    
    @NotNull(message = "书籍ID不能为空")
    private Long bookId;
    
    @NotNull(message = "数量不能为空")
    @Min(value = 1, message = "数量必须大于0")
    private Integer quantity;
    
    private BookDTO book;
    
    private LocalDateTime createTime;
    
    private LocalDateTime updateTime;
} 